package com.qf.j2112.service.impl;

import com.qf.j2112.po.SysMember;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.qf.j2112.mapper.SysMemberMapper;
import com.qf.j2112.service.SysMemberService;

import java.util.List;

/**
 * 会员信息Service业务层处理
 * @author j2112
 * @date 2022-04-12
 */

@Service
public class SysMemberServiceImpl implements SysMemberService {

    @Autowired
    private SysMemberMapper sysMemberMapper;

    /**
     * 查询会员信息
     * @param memberId 会员信息主键
     * @return 会员信息
     */
    @Override
    public SysMember selectSysMemberByMemberId(Integer memberId) {
        return sysMemberMapper.selectSysMemberByMemberId(memberId);
    }

    @Override
    public SysMember selectSysMemberByUserId(Integer userId) {
        return sysMemberMapper.selectSysMemberByUserId(userId);
    }

    /**
     * 查询会员信息列表
     * @return 会员信息
     */
    @Override
    public List<SysMember> selectSysMemberList()
    {
        return sysMemberMapper.selectSysMemberList();
    }

    /**
     * 新增会员信息
     * @param sysMember 会员信息
     * @return 结果
     */
    @Override
    public int insertSysMember(SysMember sysMember)
    {
        return sysMemberMapper.insertSysMember(sysMember);
    }

    /**
     * 修改会员信息
     * @param sysMember 会员信息
     * @return 结果
     */
    @Override
    public int updateSysMember(SysMember sysMember)
    {
        return sysMemberMapper.updateSysMember(sysMember);
    }

}
